import 'package:flutter/material.dart';
import 'package:valovault_reminder/common/ui/val_auto_fit_screen_size.dart';
import 'package:valovault_reminder/common/ui/val_common_text.dart';
import 'package:flutter/cupertino.dart';

import '../config/val_assets_name.dart';

class ValNoneDataView extends StatelessWidget {
  const ValNoneDataView({
    Key? key,
    this.msg = "No records yet～",
    this.btn,
    this.paddingTop,
    this.icon,
    this.iconSize,
    this.alignment,
  }) : super(key: key);

  final String msg;
  final Widget? btn;
  final double? paddingTop;
  final String? icon;
  final Size? iconSize;
  final AlignmentGeometry? alignment;

  @override
  Widget build(BuildContext context) {
    return Container(
      margin: EdgeInsets.only(top: paddingTop ?? 0),
      alignment: alignment ?? Alignment.center,
      child: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        mainAxisSize: MainAxisSize.min,
        children: [
          Image.asset('${ValAssetsName.ASSETS_IMAGES}val_empty_list.png', height: 187.w, width: 106.w, fit: BoxFit.fitWidth,),
          // SizedBox(height: 10.w,),
          ValCommonText.oneLine(msg, 14.w, Colors.white, fontWeight: FontWeight.w500,),
          if (btn != null) ...[SizedBox(height: 20.w,), btn!],
        ],
      ),
    );
  }
}